import app.AppConfig;
import beandefinition.OrderService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * description:
 * <p>
 * change history:
 * date             defect#             person             comments
 * ---------------------------------------------------------------------------------------------------------------------
 * 2019/11/27          ********            lightyh                create file
 *
 * @author: light
 * @date: 2019/11/27 23:36
 * @copyright: 2019, FA Software (Shanghai) Co., Ltd. All Rights Reserved.
 */
public class Test {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class);
		System.out.println(ac.getBean(OrderService.class));
	//	ac.scan();
	//	ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring.xml");
	//	Object apConfig = context.getBean("apConfig");
	//	ac.registerBean("a", AService.class);
//		GenericBeanDefinition genericBeanDefinition = new GenericBeanDefinition();
//		genericBeanDefinition.setParentName("1223");
//		ac.registerBeanDefinition("xxx", genericBeanDefinition);
//		ac.getBean(IndexService.class).getService();
//		IndexService bean = ac.getBean(IndexService.class);
//		System.out.println(bean);
//		AbstractBeanDefinition indexService = (AbstractBeanDefinition) ac.getBeanDefinition("indexService");
//		System.out.println(indexService.getSource());
	}
}